
package com.cmc.service.impl;

import java.util.List;

import com.cmc.service.impl.BaseManager;
import com.cmc.model.Region;
import com.cmc.dao.RegionDao;
import com.cmc.service.RegionManager;
/*
* @aegis.mapping
*/
public class RegionManagerImpl extends BaseManager implements RegionManager {
    private RegionDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setRegionDao(RegionDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.cmc.service.RegionManager#getRegions(com.cmc.model.Region)
     */
    public List getRegions(final Region region) {
        return dao.getRegions(region);
    }

    /**
     * @see com.cmc.service.RegionManager#getRegion(String id)
     */
    public Region getRegion(final String id) {
        return dao.getRegion(new Long(id));
    }

    /**
     * @see com.cmc.service.RegionManager#saveRegion(Region region)
     */
    public void saveRegion(Region region) {
        dao.saveRegion(region);
    }

    /**
     * @see com.cmc.service.RegionManager#removeRegion(String id)
     */
    public void removeRegion(final String id) {
        dao.removeRegion(new Long(id));
    }
}
